import request from '@/utils/request'

// 目录列表
export const getMenuList = (params) => {
  return request({
    method: 'get',
    url: '/resource/datacatalog/menu/query',
    params: params,
  })
}

// 新增目录
export const menuAdd = (params) => {
  return request({
    method: 'post',
    url: '/resource/datacatalog/menu/add',
    data: params,
  })
}

// 删除目录
export const menuDelete = (params) => {
  return request({
    method: 'delete',
    url: '/resource/datacatalog/delete',
    params: params,
  })
}

// 菜单权限查询
export const getMenuPri = (params) => {
  return request({
    method: 'get',
    url: '/resource/datacatalog/menu/pri/query',
    params: params,
  })
}

// 菜单权限更新
export const menuAddBatch = (params) => {
  return request({
    method: 'post',
    url: '/system/pri/role/addBatch',
    data: params,
  })
}

// 按钮权限查询
export const getDataPri = (params) => {
  return request({
    method: 'get',
    url: '/system/data/pri/query',
    params: params,
  })
}

// 按钮权限更新
export const dataAddBatch = (params) => {
  return request({
    method: 'post',
    url: '/system/data/pri/addOrUpdate',
    data: params,
  })
}
